package com.snopy.questions;

import java.util.ArrayList;
import java.util.List;

/**
 * @author snopy
 * @description:for循环能否移除原始
 * @classname Question1
 * @date 2020/10/16 15:57
 * @email 77912204@qq.com
 */
public class Question1 {

    public static void main(String[] args) {
        List<String> list = new ArrayList();
        list.add("A");
        list.add("B");
        list.add("C");
        list.add("D");
        list.add("E");

        for (int i=0;i<list.size();){
            System.out.println(list.get(0));
            list.remove(0);

        }
        System.out.println(list.size());
    }

}
